/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pokemon.services;

import com.pokemon.dto.PokemonDTO;
import java.util.List;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 *
 * @author Ladislav
 */
@WebService
public interface PokemonService {
    
    /**
     * Adds pokemon into database
     * 
     * @param pokemon pokemon to add
     */
    PokemonDTO addPokemon(@WebParam(name = "pokemon") PokemonDTO pokemon);

    /**
     * Extract pokemon from database according its id
     * 
     * @param id is id of pokemon which we want get from database
     * @return   pokemon acoording id, null while id can not be found
     */
    PokemonDTO getPokemon(@WebParam(name = "id") Long id);
    
    /**
     * Updates pokemon in database.
     * 
     * @param pokemon pokemon to update
     */
    PokemonDTO updatePokemon(@WebParam(name = "pokemon") PokemonDTO pokemon);
    
    /**
     * Removes pokemon from database.
     * 
     * @param pokemon pokemon to remove
     */
    PokemonDTO removePokemon(@WebParam(name = "pokemon") PokemonDTO pokemon);
    
    /**
     * Method finds all pokemonss in database and returns them
     * If there are no pokemons in database, method returns empty list.
     * 
     * @return list of all pokemons in database
     */
    List<PokemonDTO> getAllPokemons();
}
